-
Notifications
You must be signed in to change notification settings - Fork 195
Extending the guide with multiple LoRAs serving with BBR #1859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…serve multiple LoRAs (many LoRAs per one model while having multiple models)
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: davidbreitgand The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @davidbreitgand. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
| value: / | ||
| headers: | ||
| - type: Exact | ||
| #Body-Based routing(https://github.com/kubernetes-sigs/gateway-api-inference-extension/blob/main/pkg/bbr/README.md) is being used to copy the model name from the request body to the header. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this comment from the yaml?
theoretically for testing the HttpRoute functionality one can inject the header manually.
this has nothing to do with BBR, which is just an implementation detail and one way to inject the model name header.
| #Body-Based routing(https://github.com/kubernetes-sigs/gateway-api-inference-extension/blob/main/pkg/bbr/README.md) is being used to copy the model name from the request body to the header. |
| value: / | ||
| headers: | ||
| - type: Exact | ||
| #Body-Based routing(https://github.com/kubernetes-sigs/gateway-api-inference-extension/blob/main/pkg/bbr/README.md) is being used to copy the model name from the request body to the header. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| #Body-Based routing(https://github.com/kubernetes-sigs/gateway-api-inference-extension/blob/main/pkg/bbr/README.md) is being used to copy the model name from the request body to the header. |
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: vllm-llama3-8b-instruct-lora-food-review-1 #give this HTTPRoute any name that helps you to group and track the routes | ||
| spec: | ||
| parentRefs: | ||
| - group: gateway.networking.k8s.io | ||
| kind: Gateway | ||
| name: inference-gateway | ||
| rules: | ||
| - backendRefs: | ||
| - group: inference.networking.k8s.io | ||
| kind: InferencePool | ||
| name: vllm-llama3-8b-instruct | ||
| matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: / | ||
| headers: | ||
| - type: Exact | ||
| #Body-Based routing(https://github.com/kubernetes-sigs/gateway-api-inference-extension/blob/main/pkg/bbr/README.md) is being used to copy the model name from the request body to the header. | ||
| name: X-Gateway-Model-Name | ||
| value: 'food-review-1' #this is the name of LoRA as defined in vLLM deployment | ||
| timeouts: | ||
| request: 300s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is not part of the first HttpRoute llm-llama-route that maps to InferencePool vllm-llama3-8b-instruct?
| - --max-loras | ||
| - "2" | ||
| - --lora-modules | ||
| - '{"name": "food-review"}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can call the lora adapters with completely different names to avoid confusion?
(the original deployment has food-review-1).
|
@davidbreitgand minor addition (letting @nirrozenbaum drive the review) |
| ### Serving multiple LoRAs per base AI model | ||
|
|
||
| <div style="border: 1px solid red; padding: 10px; border-radius: 5px;"> | ||
| ⚠️ Known Limitation : LoRA names must be unique across the base AI models (i.e., across the backend inference server deployments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Known limitation almost implies its wrong in some way... can we just drop the limitation part?
| <div style="border: 1px solid red; padding: 10px; border-radius: 5px;"> | ||
| ⚠️ Known Limitation : | ||
| [Kubernetes API Gateway limits the total number of matchers per HTTPRoute to be less than 128](https://github.com/kubernetes-sigs/gateway-api/blob/df8c96c254e1ac6d5f5e0d70617f36143723d479/apis/v1/httproute_types.go#L128). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link isnt workin in the preview
https://deploy-preview-1859--gateway-api-inference-extension.netlify.app/guides/serve-multiple-genai-models/
| ``` | ||
| 2. Send a few requests to the LoRA of the Llama model as follows: | ||
| ```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting is strange here in the preview also.
| }' | ||
| ``` | ||
| 2. Send a few requests to the LoRA of the Llama model as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest just using 1. for all ordered list entries
kind/documentation
Closes #1858